/*
 *  (C) Copyright 2008 Insula Tecnologia da Informacao Ltda.
 * 
 *  This file is part of Vulcano.
 *
 *  Vulcano is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Vulcano is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with Vulcano.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.openinsula.vulcano.command;

import static org.junit.Assert.*;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/test-context.xml", "classpath*:META-INF/*-context.xml" })
public class ConfigurableCommandTestCase {

	@Test
	public void testSimpleConfigurableCommand() {
		SimpleStringCommand command = new SimpleStringCommand();

		try {
			command.execute();

		} catch (NullPointerException exc) {
			fail("SimpleStringCommand dependencies not ready!");
		}
	}

	@Test
	public void testCompositeConfigurableCommand() {
		CompositeCommand command = new CompositeCommand();

		try {
			command.execute();

		} catch (NullPointerException exc) {
			fail("CompositeCommand dependencies not ready!");
		}
	}

}
